#ifndef _LAYOUT_NET_SETTING_H
#define _LAYOUT_NET_SETTING_H

#include <gdk/gdkkeysyms.h>
#include <string.h>

//#include "sms.h"

#define LAN_SETTING_PATH    "/usr/share/sms/default/layout/layout-setting/"
#define LAN_SETTING_LAYOUT_NAME "layout-lan-setting"
#define NET_CONFIG_FOLDER       "/etc/network/"

static int lanset_focus_id=0;

typedef enum _LAN_STATUS
{
  STATIC,
  DHCP,
  COMFIRM
}LAN_STATUS;

typedef enum _Selete_Stat
{
  ICON_SELETE,
  WIDGET_SELETE
}Selete_Stat;
/*
typedef enum _LAN_SETTING_ICON_TYPE
{
  LAN_SETTING_ICON_TYPE_NONE,
  LAN_SETTING_ICON_TYPE_SHOW_SUB,
  LAN_SETTING_ICON_TYPE_EXEC,
  LAN_SETTING_ICON_TYPE_LAYOUT
}LAN_SETTING_ICON_TYPE;
*/
typedef struct _IconSet
{
  char *name;

  //LAN_SETTING_ICON_TYPE type;

  GooCanvasItem *icon;
  GooCanvasItem *icon_a;

  LAYOUT_WIN_ID id;

  char *cmd;
  char **argv;
  int argc;

  int x;
  int y;
  int size;
  int asize;
}IconSet;

typedef struct _Iface_t
{
  gboolean isdhcp;
  gchar name[32];
  gchar address[32];
  gchar netmask[32];
  //gchar broadcast[32];
  gchar gateway[32];
  gchar *nameserver[2];
} Iface_t;

typedef struct _Entry
{
  GooCanvasItem *text ;
  GtkWidget *entry_lan ;
  char *name ;
  char *tooltips ;
  char *font ;
  int entry_x ;
  int entry_y ;
  int text_x ;
  int text_y ;


  struct _Entry *next ;
  struct _Entry *prv ;
}Entry;

typedef struct _BackGround
{
  GooCanvasItem *bg;
  GooCanvasItem *label ;
  GooCanvasItem *pic1 ;
}BackGround;

typedef struct _LanLayout
{
  int micon_count;
  int entry_count ;
  int focus_id ;
  IconSet icons[3];
  Exec *exec;

  Layout *layout;
  char buf[512];

  Selete_Stat  selete_stat;
  LAN_STATUS lan_stat;
  Iface_t iface ;
  Entry *entrys ;
  Entry *entry_next ;
  BackGround *bg ;
}LanLayout;

#endif
